#!/usr/bin/env bash

[ "$1" = "1" ] && {
  pyinstaller run.spec --noconfirm
  #exit 0
}
[ "$1" = "2" ] && {
  pyinstaller run2.spec --noconfirm
  #exit 0
}
[ -d /d/Uploads/auto_pilot ] && rm -rf /d/Uploads/auto_pilot
#cp /c/Users/Administrator/Desktop/自动制单.lnk  /d/Uploads/auto_pilot/
\cp -r dist/run /d/Uploads/auto_pilot
\cp -r dist/run/_internal/config /d/Uploads/auto_pilot/
#\cp ../dist/crypt/crypt.exe  /d/Uploads/auto_pilot/
\cp shortcut_install.cmd /d/Uploads/auto_pilot/
\cp run.cmd /d/Uploads/auto_pilot/
\cp /c/windows/system32/chromedriver.exe  /d/Uploads/auto_pilot/
\cp *.xlsx  /d/Uploads/auto_pilot/
# 打zip包
rm -f /d/Uploads/auto_pilot.zip
cd /d/Uploads/ && zip -r auto_pilot.zip auto_pilot
